package com.smartao.base.position;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.smartao.core.dao.BaseDao;
import com.smartao.core.service.BaseEntityService;

@Service
public class PositionServiceImpl extends BaseEntityService<Position, Long> implements PositionService{

	@Autowired
	private PositionDao positionDao;
	
	@Override
	protected BaseDao<Position, Long> getDao() {
		return  positionDao;
	}

	@Override
	public List<Position> findByDepartment(Long id){
		return positionDao.findByDepartment(id);
	}
	
	@Override
	public Long countByDepartment(Long id){
		return positionDao.countByDepartment(id);
	}

	@Override
	public List<Position> findAll() {
		return positionDao.findAll();
	}
	
	@Override
	public Position findPositionAndEmployees(Long id){
		return positionDao.findPositionAndEmployee(id);
	}
	
}
